{% load i18n %}
<div class="secret {% cycle even,old %}">
{% if secret.get_gravatar_hash %}
<a class="gravatar" href="/u/{{ secret.get_gravatar_hash }}"><span class='gravatar-hash'>{{ secret.get_gravatar_hash }}</span></a>
{% else %}
<span class='gravatar-hash'>{{ secret.get_gravatar_hash }}</span>
{% endif %}
<div class="subject"><a href="{% if secret.is_saved %}/{{ secret.key.id }}{% else %}#{% endif %}">{{ secret.subject|escape }}</a></div>
<div class="story">{% if cut_story %}{{ secret.story|escape|linebreaks|truncatewords_html:50 }}{% else %}{{ secret.story|escape|linebreaks }}{% endif %}</div>
<div class="tags">
{% if secret.get_tags %}
{% trans "Tagged with" %} {% for tag in secret.get_tags %}<a class="tag" href="/tag/{{ secret.language }}/{{ tag|urlencode }}">{{ tag|escape }}</a> {% endfor %}
{% else %}
{% trans "No tags" %}
{% endif %}
</div>
<div class="poster">
{% if secret.get_gravatar_hash %}
{% blocktrans with secret.get_name|escape as secret_name and secret.published|timesince as secret_published and secret.published|date:"r" as secret_published_abs and secret.get_gravatar_hash as secret_gravatar %}<a href="/u/{{ secret_gravatar }}">{{ secret_name }}</a> posted <span class="date" title="{{ secret_published_abs }}">{{ secret_published }}</span> ago{% endblocktrans %}
{% else %}
{% blocktrans with secret.get_name|escape as secret_name and secret.published|timesince as secret_published and secret.published|date:"r" as secret_published_abs %}{{ secret_name }} posted <span class="date" title="{{ secret_published_abs }}">{{ secret_published }}</span> ago{% endblocktrans %}
{% endif %}
</div>
<div class="stuff">
{% if secret.is_saved %}
{% if is_admin %}
<div class="flag-count">{{ secret.flags }}</div><div class="delete-button"><a href="javascript:delete_secret('{{ secret.key.id }}')" class="delete">{% trans "Delete" %}</a></div>
{% else %}
<div class="flag-button"><a href="javascript:flag('{{ secret.key.id }}')" class="flag">{% trans "Flag" %}</a></div>
{% endif %}
{% if cut_story %}<div class="read-all-button"><a href="/{{ secret.key.id }}">{% trans "Read more..." %}</a></div>{% endif %}
{% if config.DISQUS_ENABLED %}<div class="disqus-comments-button"><a href="/{{ secret.key.id }}#disqus_thread">{% trans "View Comments" %}</a></div>{% endif %}
{% endif %}
</div>
</div>
